package org.dromara.authcode.domain.bo;

import org.dromara.authcode.domain.TOrder;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 订单业务对象 t_order
 *
 * @author Miles Meng
 * @date 2025-08-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = TOrder.class, reverseConvertGenerate = false)
public class TOrderBo extends BaseEntity {

    /**
     * 订单号
     */
    @NotNull(message = "订单号不能为空", groups = { EditGroup.class })
    private Long orderNo;

    /**
     * 商品ID
     */
    @NotNull(message = "商品ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long goodsId;

    /**
     * 点数
     */
    @NotNull(message = "点数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long points;

    /**
     * 订单金额;单位：分
     */
    @NotNull(message = "订单金额;单位：分不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long orderAmt;

    /**
     * 订单状态;UNPAY 未支付；PAYED 已支付；
     */
    @NotBlank(message = "订单状态;UNPAY 未支付；PAYED 已支付；不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderStatus;

    /**
     * 订单时间
     */
    @NotNull(message = "订单时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date orderTime;

    /**
     * 用户id
     */
    @NotNull(message = "用户id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 订单成功完成时间
     */
    private Date succTime;

    /**
     * 订单成功的支付流水ID
     */
    private Long succPayTransId;

    /**
     * 钱包流水ID
     */
    private Long walletFlowId;


}
